home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SNNSV32.ZIP / SNNSv3.2 / kernel / sources / kr_newpattern.ph < prev    next >
Text File  |  1994-04-25  |  28KB  |  536 lines

  1. /*****************************************************************************
  2.   FILE           : kr_newpattern.ph
  3.   SHORTNAME      : newpattern
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : handling of new pattern format
  7.   NOTES          : 
  8.  
  9.   AUTHOR         : Michael Vogt
  10.   DATE           : 10.9.93
  11.  
  12.   CHANGED BY     : 
  13.   IDENTIFICATION : @(#)kr_newpattern.ph    1.3 3/15/94
  14.   SCCS VERSION   : 1.3
  15.   LAST CHANGE    : 3/15/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.  
  19. ******************************************************************************/
  20.  
  21. #ifndef _KR_NEWPATTERN_DEFINED_
  22. #define _KR_NEWPATTERN_DEFINED_
  23.  
  24. /* begin global definition section */
  25.  
  26. /*****************************************************************************
  27.  FUNCTIONS WHICH ARE CALLED BY THE KERNEL USER INTERFACE TO PERFORM
  28.  THE KERNEL INTERFACE OF THE NEW PATTERN MANAGEMENT
  29. ******************************************************************************/
  30.  
  31. krui_err kr_npui_setCurrPatSet(int number);
  32. /*****************************************************************************
  33. determines the number of the current pattern set (in kernel terminology) 
  34. numbering starts with 0
  35. ******************************************************************************/
  36.  
  37. krui_err kr_npui_deletePatSet(int number);
  38. /*****************************************************************************
  39. deletes the specified pattern set from memory and undefines the
  40. current pattern set, pattern, training scheme and display scheme
  41. ******************************************************************************/
  42.  
  43. krui_err kr_npui_GetPatInfo(pattern_set_info *set_info, 
  44.                 pattern_descriptor *pat_info);
  45. /*****************************************************************************
  46. retrieves all available information concerning the current pattern set
  47. and the current pattern which both must be defined. The given
  48. parameter fields are filled with the information.
  49. ******************************************************************************/
  50.  
  51. krui_err kr_npui_DefShowSubPat(int *insize, int *outsize, 
  52.                    int *inpos, int *outpos);
  53. /*****************************************************************************
  54. Define the display scheme:
  55. Size and position of a sub pattern for the current pattern in the
  56. current pattern set is defined. <insize> is a pointer to an array of
  57. integer values which define the dimensional sizes of the input sub
  58. pattern. <inpos> is a pointer to an array of integer values which
  59. defines the offset (position) of this sub pattern inside the
  60. pattern. <outsize> and <outpos> are used to define the respective
  61. output sub pattern
  62. ******************************************************************************/
  63.  
  64. krui_err kr_npui_DefTrainSubPat(int *insize, int *outsize, 
  65.                 int *instep, int *outstep, int *max_n_pos);
  66. /*****************************************************************************
  67. Define the training scheme:
  68. Size and step size of sub pattern for the current pattern in the
  69. current pattern set is defined for training and testing. <insize> is a
  70. pointer to an array of integer values which define the dimensional
  71. sizes of the input sub pattern. <instep> is a pointer to an array of
  72. integer values which defines the step size which is used to move the
  73. sub pattern over the pattern.
  74. <outsize> and <outpos> are used to define the respective output sub
  75. pattern.
  76. <max_n_pos> (if not NULL) returns the number of valid input sub
  77. pattern positions for the current pattern and the given training
  78. scheme.
  79. ******************************************************************************/
  80.  
  81. krui_err kr_npui_AlignSubPat(int *inpos, int *outpos, int *no);
  82. /*****************************************************************************
  83. Align the position of a sub pattern:
  84. Using the current training scheme and the current pattern of the
  85. current pattern set, the given position of an input sub pattern
  86. <inpos> and the given position of the corresponding output sub pattern
  87. <outpos> is aligned to fit the currently defined training scheme.
  88. E.g. if the training scheme defines a step width of 5 for a specific
  89. dimension, only the positions 0, 5, 10, 15 ...  are valid positions
  90. for a sub pattern.
  91. The position of each dimension is aligned independently from all other
  92. dimensions by moving to the next valid position which is lower or
  93. equal to the given position.  <no> (if not NULL) returns the number of
  94. the sub pattern which corresponds to the new aligned position which is
  95. returned in place (<inpos> <outpos>).
  96. ******************************************************************************/
  97.  
  98. krui_err kr_npui_allocNewPatternSet(int *set_no);
  99. /*****************************************************************************
  100. Allocate an (additional) empty pattern set: A new pattern set is
  101. allocated if the maximum number of loaded pattern sets
  102. (NO_OF_PAT_SETS) is not exceeded. The corresponding pattern set handle
  103. is returned in <set_no>.  The new allocated pattern set becomes the
  104. current set.  There is no current pattern defined.  Training scheme
  105. and display scheme both become undefined.
  106. ******************************************************************************/
  107.  
  108. krui_err kr_npui_loadNewPatterns(char *filename, int *set_no);
  109. /*****************************************************************************
  110. Load an (additional) pattern file:
  111. The file with name <filename> is loaded into memory if existent and if
  112. the maximum number of loaded pattern sets (NO_OF_PAT_SETS) is not
  113. exceeded. The corresponding pattern set handle is returned in
  114. <set_no>.
  115. The new loaded pattern set becomes the current set. The first pattern
  116. inside this set becomes the current pattern. Training scheme and
  117. display scheme both become undefined.
  118. ******************************************************************************/
  119.  
  120. krui_err kr_npui_saveNewPatterns(char *filename, int set_no);
  121. /*****************************************************************************
  122. The given pattern set <set_no> is written to file <filename> in new
  123. style format. No side effects.
  124. ******************************************************************************/
  125.  
  126. krui_err kr_npui_GetShapeOfSubPat(int *insize, int *outsize, 
  127.                   int *inpos, int *outpos, int n_pos);
  128. /*****************************************************************************
  129. Get the shape of a sub pattern which is specified by a number:
  130. After kr_npui_DefTrainSubPat has been called for the current pattern
  131. set and a current pattern is defined, this function retrieves the
  132. <n_pos>th valid sub pattern pair which matches the defined training
  133. scheme. Size and position of the sub pattern pair is returned in
  134. <insize> <inpos> <outsize> and <outpos> which are all pointer to
  135. integer arrays.
  136. ******************************************************************************/
  137.  
  138. /*****************************************************************************
  139.  FUNCTIONS WHICH ARE CALLED BY OTHER KERNEL FUNCTIONS LIKE TRAINING
  140.  AND INITIALIZATION FUNCTIONS:
  141. ******************************************************************************/
  142.  
  143. int  kr_np_pattern(int mode ,int mode1 ,int pattern_no);
  144. /*****************************************************************************
  145. multiple pattern handling functions depending on mode and mode1
  146. *****************************************************************************/
  147.  
  148. krui_err kr_initSubPatternOrder(int start, int end);
  149. /*****************************************************************************
  150. The sub pattern ordering for the current pattern set is reset for the
  151. next training or initialization run. During this run all sub patterns
  152. from pattern <start> up to pattern <end> are generated according to
  153. current shuffle flags for patterns and sub patterns.
  154. kr_getSubPatByOrder is to be called to get the next sub pattern number
  155. during the run (see below)
  156. *****************************************************************************/
  157.  
  158. bool kr_getSubPatternByOrder(int *pattern, int *sub);
  159. /*****************************************************************************
  160. According to the last call to kr_initSubPatternOrder, the last call to
  161. this function and the shuffle flags, the next position of pattern and
  162. sub pattern is determined. This numbers are returned in <pattern> and
  163. <sub> (beginning with 0). If there are no more sub pattern avaliable
  164. the return value is FALSE, otherwise TRUE.
  165. *****************************************************************************/
  166.  
  167. bool kr_getSubPatternByNo(int *pattern, int *sub, int n);
  168. /*****************************************************************************
  169. According to the current pattern set, the position of the <n>th sub
  170. pattern is determined and returned in <pattern> (the pattern which
  171. includes the subpattern) and <sub> (the sub pattern inside the
  172. pattern) (beginning with 0). 
  173. This function does not effect the ordering of the function
  174. kr_getSubPatByOrder. <n> ranges from 0 to kr_TotalNoOfSubPatPairs()-1.
  175. If the sub pattern is available, TRUE is returned, otherwise FALSE.
  176. *****************************************************************************/
  177.  
  178. int kr_TotalNoOfSubPatPairs(void);
  179. /*****************************************************************************
  180. This function returns the total number of available sub patterns for
  181. the current pattern set or 0 if no pattern set is defined.
  182. The result is the sum of the numbers of subpattern for all patterns in
  183. the current set.
  184. *****************************************************************************/
  185.  
  186. int kr_NoOfSubPatPairs(int pattern);
  187. /*****************************************************************************
  188. This function returns the number of available sub patterns for the
  189. pattern <pattern> of the current pattern set or 0 if this pattern is
  190. not defined.
  191. *****************************************************************************/
  192.  
  193. int kr_AbsPosOfFirstSubPat(int pattern);
  194. /*****************************************************************************
  195. This function returns the absolute position of the first sub pattern
  196. of pattern <pattern> in the current pattern set. This position is
  197. defined as the Sum of kr_NoOfSubPatPairs(i) where i runs from 0 to
  198. <pattern>-1.
  199. The absolute position of the first sub pattern of pattern 0 is 0.
  200. The returned value may be used as argument for the function
  201. kr_getSubPatternByNo.
  202. *****************************************************************************/
  203.  
  204. int kr_TotalNoOfPattern(void);
  205. /*****************************************************************************
  206. This function returns the total number of available patterns for
  207. the current pattern set or 0 if no pattern set is defined.
  208. *****************************************************************************/
  209.  
  210. Patterns kr_getSubPatData(int pat_no, int sub_no, int io_type, int *size);
  211. /*****************************************************************************
  212. For the current pattern set and the specified sub pattern size, the
  213. data array of the <sub_no>th sub pattern of the <pat_no>th pattern is
  214. returned. io_type spcifies whether the input (INPUT) or output
  215. (OUTPUT) data is requested. If <size> is != NULL the size of the data
  216. array is returned is this parameter.
  217. The function returns a pointer to the data array (type Patterns) or
  218. NULL if an error occured.
  219. *****************************************************************************/
  220.  
  221. int kr_SizeOfInputSubPat(void);
  222. /*****************************************************************************
  223. For the current pattern set and the specified sub pattern size, the size of 
  224. the input part of the first sub pattern of the first pattern is returned. 
  225. Negative return values indicate KernelErrorCode. Size 0 is a valid return value
  226. since the pattern may contain no data.
  227. *****************************************************************************/
  228.  
  229. int kr_SizeOfOutputSubPat(void);
  230. /*****************************************************************************
  231. For the current pattern set and the specified sub pattern size, the size of 
  232. the output part of the first sub pattern of the first pattern is returned. 
  233. Negative return values indicate KernelErrorCode. Size 0 is a valid return value
  234. since the pattern may contain no data.
  235. *****************************************************************************/
  236.  
  237. /*****************************************************************************
  238.  FUNCTIONS WHICH ARE CALLED BY THE PATTERN PARSER OR FROM INSIDE THIS
  239.  MODULE. DON'T USE THESE FUNCTIONS FOR OTHER PURPOSES !!!!!
  240. ******************************************************************************/
  241.  
  242. krui_err kr_np_AllocatePatternSet(int *pat_set, int number);
  243. /*****************************************************************************
  244. A new set of patterns with <number> number of patterns is defined. An
  245. internal pattern set number is assigned to reference this pattern set.
  246. It is returned in <pat_set>.
  247. ******************************************************************************/
  248.  
  249. krui_err kr_np_AllocatePattern(pattern_descriptor *pattern,
  250.                    bool input);
  251. /*****************************************************************************
  252. Depending on the entries input_dim, input_dim_sizes, input_fixsize resp.
  253. output_dim, output_dim_sizes, output_fixsize of the pattern descriptor
  254. <pattern> new memory for this pattern is allocated (input_pattern resp.
  255. output_pattern). input_info resp. output_info is set to (char *) NULL.
  256. The function allocates space for an input pattern if input is TRUE,
  257. output pattern otherwise.
  258. ******************************************************************************/
  259.  
  260. krui_err kr_np_GetDescriptor(int pat_set, int number, 
  261.                  pattern_descriptor **pattern);
  262. /*****************************************************************************
  263. A pointer to the pattern pattern descriptor of pattern <number> in
  264. pattern set <pat_set> is returned in <pattern>. The structure pattern
  265. must be provided by the calling routine. A call to this function makes
  266. the specified pattern to become the current pattern.  Return value:
  267. error status
  268. ******************************************************************************/
  269.  
  270.  
  271. /* end global definition section */
  272.  
  273. /* begin private definition section */
  274.  
  275. /*****************************************************************************
  276.  INTERNAL FUNCTIONS OF THIS MODULE. IMPOSSIBLE TO CALL THESE FUNCTIONS
  277.  FROM OUTSIDE THE MODULE (IF NOBODY CHANGES THE STATIC DECLARATION) !!!!!!!
  278. ******************************************************************************/
  279.  
  280. static krui_err kr_np_InitPattern(void);
  281. /*****************************************************************************
  282. initialization of pattern descriptor array
  283. ******************************************************************************/
  284.  
  285. static krui_err kr_np_ReallocatePatternSet(int pat_set, int new_number);
  286. /*****************************************************************************
  287. reallocates the pattern set <pat_set> to contain <new_number> 
  288. of pattern entries.
  289. ******************************************************************************/
  290.  
  291. static krui_err kr_np_DeletePatternSet(int pat_set);
  292. /*****************************************************************************
  293. The pattern set <pat_set> is deleted. All memory of all pattern is
  294. given back to the operating system.
  295. ******************************************************************************/
  296.  
  297. static krui_err kr_np_DeletePattern(int pat_set, int pattern);
  298. /*****************************************************************************
  299. delete a specific pattern form a pattern set
  300. ******************************************************************************/
  301.  
  302. static krui_err kr_np_AddPattern(int pat_set, int *pattern);
  303. /*****************************************************************************
  304. Add an empty pattern descriptor to the specified pattern set. The position
  305. of the pattern inside the set is returned in <pattern>.
  306. ******************************************************************************/
  307.  
  308. static krui_err kr_np_LoadPatternFile(FILE *pat_file, int *pat_set);
  309. /*****************************************************************************
  310. The pattern file <pat_file> is loaded into memory. An internal pattern
  311. set number is assigned to this pattern file and returned in <pat_set>.
  312. Return value: error status
  313. ******************************************************************************/
  314.  
  315. static krui_err kr_np_SavePatternFile(FILE *pat_file, int pat_set);
  316. /*****************************************************************************
  317. The pattern set <pat_set> is saved to FILE <pat_file>.
  318. Return value: error status
  319. ******************************************************************************/
  320.  
  321. static krui_err kr_np_GetInfo(int pat_set, pattern_set_info *info);
  322. /*****************************************************************************
  323. All information concerning pattern set <pat_set> is copied into the
  324. informational structure <info> which must be provided by the calling
  325. routine.
  326. The current pattern set is set to pat_set.
  327. Return value: error status
  328. ******************************************************************************/
  329.  
  330. static krui_err kr_np_GetSubPatSizes(int *input_size, int *output_size);
  331. /*****************************************************************************
  332. Depending on the current pattern set and the sub pattern training scheme,
  333. which must be defined, the size of the first input sub pattern and the size
  334. of the first output sub pattern is computed.
  335. ******************************************************************************/
  336.  
  337. static krui_err kr_np_GetSubPat(bool input, int *pos_coord, int *size_coord,
  338.                 float **data, int *entries);
  339. /*****************************************************************************
  340. A sub pattern is cut out of the current pattern at position
  341. <pos_coord> with size <size_coord>. According to <input> the input
  342. part or the output part of the current pattern is used. A pointer to
  343. an array of float which contains the cut part is returned in <data>.
  344. <pos_coord> is an array of int which defines the position of the sub
  345. pattern inside the variable sized dimensions of the pattern.
  346. <size_coord> is an array of int which defines the size of the sub
  347. pattern in each dimensional direction. Both arrays must contain
  348. <input_dim> (or <output_dim>) entries (see pattern descriptor).
  349.  
  350. Example: pattern with input_fixsize 2, input_dim 2, input_dim_sizes [4 5]
  351. (hint: the values of the pattern represent the position)
  352.  
  353. {
  354. 0.00, 0.01, 0.10, 0.11, 0.20, 0.21, 0.30, 0.31, 0.40, 0.41,
  355. 1.00, 1.01, 1.10, 1.11, 1.20, 1.21, 1.30, 1.31, 1.40, 1.41,
  356. 2.00, 2.01, 2.10, 2.11, 2.20, 2.21, 2.30, 2.31, 2.40, 2.41,
  357. 3.00, 3.01, 3.10, 3.11, 3.20, 3.21, 3.30, 3.31, 3.40, 3.41,
  358. }
  359.  
  360. the sub pattern with <pos_coord> [1 2], <size_coord> [3 2] looks like
  361. this:
  362.  
  363. {
  364. 1.20, 1.21, 1.30, 1.31,
  365. 2.20, 2.21, 2.30, 2.31,
  366. 3.20, 3.21, 3.30, 3.31,
  367. }
  368.  
  369. The parameter entries returns the number of entries in the data field.
  370.  
  371. ******************************************************************************/
  372.  
  373. static krui_err kr_np_SetSubPat(bool input, int *pos_coord, int *size_coord,
  374.                 float *data, int entries);
  375. /*****************************************************************************
  376. Equivalent to kr_np_GetSubPat, but copies the <data> into the specified 
  377. sub pattern
  378. *****************************************************************************/
  379.  
  380. static bool kr_np_align_sub_pos(int dim, int *n, int *psize, int *ssize, 
  381.                 int *sstep, int *spos);
  382. /*****************************************************************************
  383. For a given pattern dimension size <psize> of <dim> dimensions and a
  384. given sub pattern size <ssize> the position <spos> of the sub pattern
  385. is alligned to a valid position and the ordering number of this sub
  386. pattern is returned in <n>. The shift pattern given in <sstep> is used
  387. to find valid allignment positions
  388. *****************************************************************************/
  389.  
  390. static bool kr_np_gen_sub_pos(int dim, int *n, int *psize, int *ssize, 
  391.                   int *sstep, int *spos, bool count);
  392. /*****************************************************************************
  393. For a given pattern dimension size <psize> of <dim> dimensions and a
  394. given sub pattern size <ssize> the position <spos> of the <n>th sub
  395. pattern is calculated. The shift pattern given in <sstep> is used to
  396. move sub pattern over the pattern.
  397. If <count> is TRUE, only the number of possible positions is
  398. determined and returned in <n> if at least 1 valid position
  399. exists. <spos> is of no effect and may be NULL.
  400. RETURNS  : 
  401. TRUE if the <n>th subpattern exists or if <count> is TRUE and at least
  402. 1 valid position exists, FALSE if <n> < 0.  If <n> is higher than the
  403. available number of subpattern, a wraparound occurs.
  404. <n> starts with 0 and ends with <number of possible positions> - 1 or
  405. returns number of possible positions.
  406. *****************************************************************************/
  407.  
  408. static bool kr_np_allocate_pat_train_entries(int n);
  409. /*****************************************************************************
  410. allocate or reallocate an array which will later include the sorted or
  411. shuffled pattern order (during training)
  412. *****************************************************************************/
  413.  
  414. static bool kr_np_allocate_sub_pat_train_entries(int n);
  415. /*****************************************************************************
  416. allocate or reallocate an array which will later include the sorted or
  417. shuffled order of the sub pattern of the current pattern
  418. *****************************************************************************/
  419.  
  420. static void kr_np_order_pat_entries(int start, int end);
  421. /*****************************************************************************
  422. Fills the allocated array for the pattern ordering with increasing
  423. numbers if patterns are sorted or with a random permutation if
  424. patterns are shuffled.  <start> and <end> define the first and last
  425. pattern number to be used
  426. *****************************************************************************/
  427.  
  428. static void kr_np_order_sub_pat_entries(int start, int end);
  429. /*****************************************************************************
  430. Fills the allocated array for the sub pattern ordering with increasing
  431. numbers if sub patterns are sorted or with a random permutation if sub
  432. patterns are shuffled.  <start> and <end> define the first and last
  433. sub pattern number to be used
  434. *****************************************************************************/
  435.  
  436. static krui_err kr_np_DefineSubPatternOrdering(int pat_set, bool input, 
  437.                            int *size_coord, 
  438.                            int *incr_coord);
  439. /*****************************************************************************
  440. The shape and ordering of sub patterns for training and display is
  441. defined.  <pat_set> specifies the pattern set to use. The flag <input>
  442. determines whether input or output sub patterns are to be defined. The
  443. array size_coord spezifies the shape of the sub pattern like in
  444. kr_np_GetSubPat. The array incr_coord specifies how sub patterns are
  445. generated from the whole pattern by shifting the shape over this
  446. pattern. Each value in this array gives an incremental offset for one
  447. dimensional direction. The start position is at [0 0 0 ...]. New
  448. positions are generated by adding the rightmost value of incr_coord to
  449. the old position. If an overflow in this dimension occurs, this
  450. coordinate is reset to 0 and the next position to the left is
  451. incremented (and so on ...). After all sub patterns of one pattern are
  452. generated the next pattern is used. Depending on npui_shuffle_pattern
  453. and npui_shuffle_sub_pattern shuffling is activated.
  454. *****************************************************************************/
  455.  
  456. static krui_err kr_np_showPatternSTD(int mode);
  457. /*****************************************************************************
  458. According to the mode kr_np_showPatternSTD stores the current
  459. Pattern/sub Pattern into the units activation (and/or output) values.
  460. The modes are:
  461. - OUTPUT_NOTHING
  462. store input pattern into input units activations
  463. - OUTPUT_ACT
  464. store input pattern into input units activations and store output
  465. pattern into output units activations
  466. - OUTPUT_OUT
  467. store input pattern into input units activations, store output pattern
  468. into output units activations and update output units output
  469. *****************************************************************************/
  470.  
  471. static krui_err kr_np_modifyPattern(void);
  472. /*****************************************************************************
  473. The current activation of the input and output units is used to
  474. modify the current sub pattern.
  475. *****************************************************************************/
  476.  
  477. /*****************************************************************************
  478.  STATIC VARIABLE DEFINITIONS
  479. *****************************************************************************/
  480.  
  481. static int                npui_pat_sets[NO_OF_PAT_SETS];
  482. static int                npui_curr_pat_set                = -1;
  483. static int                npui_curr_pattern                = -1;
  484. static int                npui_number_pat_sets             = 0;
  485. static int                npui_insize[MAX_NO_OF_VAR_DIM];
  486. static int                npui_outsize[MAX_NO_OF_VAR_DIM];
  487. static int                npui_inpos[MAX_NO_OF_VAR_DIM];
  488. static int                npui_outpos[MAX_NO_OF_VAR_DIM];
  489. static int                npui_instep[MAX_NO_OF_VAR_DIM];
  490. static int                npui_outstep[MAX_NO_OF_VAR_DIM];
  491. static bool               npui_show_defined                = FALSE;
  492. static bool               npui_train_defined               = FALSE;
  493. static bool               npui_shuffle_pattern             = FALSE;
  494. static bool               npui_shuffle_sub_pattern         = FALSE;
  495.  
  496. static int                *np_pat_train_order              = NULL;
  497. static int                *np_sub_pat_train_order          = NULL;
  498. static bool               np_pat_train_valid               = FALSE;
  499. static bool               np_sub_pat_train_valid           = FALSE;
  500. static int                np_pat_train_size                = 0;
  501. static int                np_sub_pat_train_size            = 0;
  502. static int                np_next_train_pat                = -1;
  503. static int                np_next_train_sub_pat            = -1;
  504. static int                np_next_train_random             = -1;
  505. static int                np_pat_train_number              = 0;
  506. static int                np_sub_pat_train_number          = 0;
  507. static int                np_random_train_number           = 0;
  508. static int                np_t_insize[MAX_NO_OF_VAR_DIM];
  509. static int                np_t_outsize[MAX_NO_OF_VAR_DIM];
  510. static int                np_t_instep[MAX_NO_OF_VAR_DIM];
  511. static int                np_t_outstep[MAX_NO_OF_VAR_DIM];
  512.  
  513. static int                *np_abs_count                    = NULL;
  514. static int                np_abs_count_size                = 0;
  515. static int                np_abs_count_No                  = 0;
  516. static bool               np_abs_count_valid               = FALSE;
  517.  
  518. static int                np_sub_pat_input_size            = 0;
  519. static int                np_sub_pat_output_size           = 0;
  520. static bool               np_sub_pat_sizes_valid           = FALSE;
  521.  
  522. static pattern_descriptor **np_pat_sets                    = NULL;
  523. static bool               *np_pat_set_used                 = NULL;
  524. static int                np_used_pat_set_entries          = 0;
  525. static pattern_descriptor *np_current_pattern              = NULL;
  526. static pattern_set_info   *np_info                         = NULL;
  527. static bool               *np_info_valid                   = NULL;
  528. static float              *np_i_subpat                     = NULL;
  529. static int                np_i_subpatsize                  = 0;
  530. static float              *np_o_subpat                     = NULL;
  531. static int                np_o_subpatsize                  = 0;
  532.  
  533. /* end private definition section */
  534.  
  535. #endif
  536.